The first item in template-description is a path and the file name of the library. The second item is a random generator seed in the range 0.0000-0.9999. If the item is nil, then initialisation is not performed. If the third item is a list, it is evaluated, and the return value is used as a template. If it is an atom, then it and all atoms in the rest template-description list are used as templates. If the names exists in the library, the values associated with them are used, and no randomness takes place. Otherwise the template is filled randomly by mapping template symbols to elements in the active library. The active library is set with (set-tonality-path foldername).
(def-tonality
piano
(pick-tonality
("pop chords:pop in major" 0.34 a b a b a b a c a b a b a b a d)
("pop chords:pop in minor" nil (use-item definition))